# Sustainable Office Designer
# by Fabian Ritter <Fabian.Ritter@live.de>, 2012

module SOD
  
  class DesignRules
    
    attr_reader :floorDesign, :flexibility
    attr_reader :storeyList
    
    def initialize
      @floorDesign = ["0-50sm", "50-100sm", "100-400sm"]
      @flexibility = ["low", "medium", "high"]
      @maxNumOfStoreys = 7
    end
    
    def levelHeight(kind)
      case kind.to_s
        when "0-50sm" then return 2.5.m
        when "50-100sm" then return 2.75.m
        when "100-400sm" then return 3.0.m
      else return nil
      end
    end
    
    def constructionHeight(flexibility)
      case flexibility
        when "low" then return 0.3.m
        when "medium" then return 0.4.m
        when "high" then return 0.5.m
      else return nil
      end
    end
    
    def storeyList
      list = []
      for i in 1..@maxNumOfStoreys
        list << i.to_s
      end
      return list
    end
  end
  
end
